<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Irrlicht 3D Engine: irr::SEvent::SJoystickEvent Struct Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="irrlichtlogo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Irrlicht 3D Engine
   
   </div>
   
  </td>
  
  
  
   
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="dynsections.js"></script>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('structirr_1_1_s_event_1_1_s_joystick_event.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">irr::SEvent::SJoystickEvent Struct Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="irr::SEvent::SJoystickEvent" -->
<p>A joystick event.  
 <a href="structirr_1_1_s_event_1_1_s_joystick_event.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_i_event_receiver_8h_source.html">IEventReceiver.h</a>&gt;</code></p>

<p><a href="structirr_1_1_s_event_1_1_s_joystick_event-members.html">List of all members.</a></p>
<h2><a name="pub-types"></a>
Public Types</h2>
<ul>
<li>enum { <br/>
&#160;&#160;<a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#a2b0fac734e2cb4a5700ebadb68e5ef71adde1bff7510f76b3fd2955a5cfda32e3">NUMBER_OF_BUTTONS</a> =  32, 
<a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#a2b0fac734e2cb4a5700ebadb68e5ef71a636599ff015889eb57338dc0ee126f98">AXIS_X</a> =  0, 
<a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#a2b0fac734e2cb4a5700ebadb68e5ef71ab4e23f6901d2f4c65e5898250b37dce2">AXIS_Y</a>, 
<a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#a2b0fac734e2cb4a5700ebadb68e5ef71ac5a3ec3e27ed268695c1c56972df0933">AXIS_Z</a>, 
<br/>
&#160;&#160;<a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#a2b0fac734e2cb4a5700ebadb68e5ef71ad3c6da87eec4ee8c8552bb685c53d1e5">AXIS_R</a>, 
<a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#a2b0fac734e2cb4a5700ebadb68e5ef71aa0071bdf7ce1a4e1fb50dc85dd8c143e">AXIS_U</a>, 
<a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#a2b0fac734e2cb4a5700ebadb68e5ef71a2114f66a2b79961807a8063230d05edc">AXIS_V</a>, 
<a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#a2b0fac734e2cb4a5700ebadb68e5ef71a6fb67d57cfd88f4ea168bdc8372b531b">NUMBER_OF_AXES</a>
<br/>
 }
</ul>
<h2><a name="pub-methods"></a>
Public Member Functions</h2>
<ul>
<li>bool <a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#adac7656dc2bc1fedab52d7f84ce52872">IsButtonPressed</a> (<a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> button) const 
<dl class="el"><dd class="mdescRight">A helper function to check if a button is pressed.  <a href="#adac7656dc2bc1fedab52d7f84ce52872"></a><br/></dl></ul>
<h2><a name="pub-attribs"></a>
Public Attributes</h2>
<ul>
<li><a class="el" href="namespaceirr.html#a43ace0af066371ac0862bac3f7314220">s16</a> <a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#a1ad2615ffdd8de01b93414228ac3a2d9">Axis</a> [NUMBER_OF_AXES]
<li><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> <a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#a4fd74c22d62c1613405dc3191ccc5b7c">ButtonStates</a>
<li><a class="el" href="namespaceirr.html#a646874f69af8ff87fc10201b0254a761">u8</a> <a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#a04424b44a1c3370263afb3af501cae44">Joystick</a>
<dl class="el"><dd class="mdescRight">The ID of the joystick which generated this event.  <a href="#a04424b44a1c3370263afb3af501cae44"></a><br/></dl><li><a class="el" href="namespaceirr.html#ae9f8ec82692ad3b83c21f555bfa70bcc">u16</a> <a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#af30285332d154507b9752ffde3f6bf84">POV</a>
</ul>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A joystick event. </p>
<p>Unlike other events, joystick events represent the result of polling each connected joystick once per run() of the device. Joystick events will not be generated by default. If joystick support is available for the active device, _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ is defined, and <a class="el" href="classirr_1_1_irrlicht_device.html#af06f8d2c4fdffd1f879e46685bcbc6e3">irr::IrrlichtDevice::activateJoysticks()</a> has been called, an event of this type will be generated once per joystick per <a class="el" href="classirr_1_1_irrlicht_device.html#a0489f8151dc43f6f41503ffb5a160b35">IrrlichtDevice::run()</a> regardless of whether the state of the joystick has actually changed. </p>

<p>Definition at line <a class="el" href="_i_event_receiver_8h_source.html#l00342">342</a> of file <a class="el" href="_i_event_receiver_8h_source.html">IEventReceiver.h</a>.</p>
</div><hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="a2b0fac734e2cb4a5700ebadb68e5ef71"></a><!-- doxytag: member="irr::SEvent::SJoystickEvent::@2" ref="a2b0fac734e2cb4a5700ebadb68e5ef71" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a2b0fac734e2cb4a5700ebadb68e5ef71adde1bff7510f76b3fd2955a5cfda32e3"></a><!-- doxytag: member="NUMBER_OF_BUTTONS" ref="a2b0fac734e2cb4a5700ebadb68e5ef71adde1bff7510f76b3fd2955a5cfda32e3" args="" -->NUMBER_OF_BUTTONS</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a2b0fac734e2cb4a5700ebadb68e5ef71a636599ff015889eb57338dc0ee126f98"></a><!-- doxytag: member="AXIS_X" ref="a2b0fac734e2cb4a5700ebadb68e5ef71a636599ff015889eb57338dc0ee126f98" args="" -->AXIS_X</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a2b0fac734e2cb4a5700ebadb68e5ef71ab4e23f6901d2f4c65e5898250b37dce2"></a><!-- doxytag: member="AXIS_Y" ref="a2b0fac734e2cb4a5700ebadb68e5ef71ab4e23f6901d2f4c65e5898250b37dce2" args="" -->AXIS_Y</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a2b0fac734e2cb4a5700ebadb68e5ef71ac5a3ec3e27ed268695c1c56972df0933"></a><!-- doxytag: member="AXIS_Z" ref="a2b0fac734e2cb4a5700ebadb68e5ef71ac5a3ec3e27ed268695c1c56972df0933" args="" -->AXIS_Z</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a2b0fac734e2cb4a5700ebadb68e5ef71ad3c6da87eec4ee8c8552bb685c53d1e5"></a><!-- doxytag: member="AXIS_R" ref="a2b0fac734e2cb4a5700ebadb68e5ef71ad3c6da87eec4ee8c8552bb685c53d1e5" args="" -->AXIS_R</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a2b0fac734e2cb4a5700ebadb68e5ef71aa0071bdf7ce1a4e1fb50dc85dd8c143e"></a><!-- doxytag: member="AXIS_U" ref="a2b0fac734e2cb4a5700ebadb68e5ef71aa0071bdf7ce1a4e1fb50dc85dd8c143e" args="" -->AXIS_U</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a2b0fac734e2cb4a5700ebadb68e5ef71a2114f66a2b79961807a8063230d05edc"></a><!-- doxytag: member="AXIS_V" ref="a2b0fac734e2cb4a5700ebadb68e5ef71a2114f66a2b79961807a8063230d05edc" args="" -->AXIS_V</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a2b0fac734e2cb4a5700ebadb68e5ef71a6fb67d57cfd88f4ea168bdc8372b531b"></a><!-- doxytag: member="NUMBER_OF_AXES" ref="a2b0fac734e2cb4a5700ebadb68e5ef71a6fb67d57cfd88f4ea168bdc8372b531b" args="" -->NUMBER_OF_AXES</em>&nbsp;</td><td>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="_i_event_receiver_8h_source.html#l00344">344</a> of file <a class="el" href="_i_event_receiver_8h_source.html">IEventReceiver.h</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="adac7656dc2bc1fedab52d7f84ce52872"></a><!-- doxytag: member="irr::SEvent::SJoystickEvent::IsButtonPressed" ref="adac7656dc2bc1fedab52d7f84ce52872" args="(u32 button) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool irr::SEvent::SJoystickEvent::IsButtonPressed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>button</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A helper function to check if a button is pressed. </p>

<p>Definition at line <a class="el" href="_i_event_receiver_8h_source.html#l00384">384</a> of file <a class="el" href="_i_event_receiver_8h_source.html">IEventReceiver.h</a>.</p>

<p>References <a class="el" href="_i_event_receiver_8h_source.html#l00359">ButtonStates</a>, and <a class="el" href="_i_event_receiver_8h_source.html#l00346">NUMBER_OF_BUTTONS</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a1ad2615ffdd8de01b93414228ac3a2d9"></a><!-- doxytag: member="irr::SEvent::SJoystickEvent::Axis" ref="a1ad2615ffdd8de01b93414228ac3a2d9" args="[NUMBER_OF_AXES]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#a43ace0af066371ac0862bac3f7314220">s16</a> <a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#a1ad2615ffdd8de01b93414228ac3a2d9">irr::SEvent::SJoystickEvent::Axis</a>[NUMBER_OF_AXES]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>For AXIS_X, AXIS_Y, AXIS_Z, AXIS_R, AXIS_U and AXIS_V Values are in the range -32768 to 32767, with 0 representing the center position. You will receive the raw value from the joystick, and so will usually want to implement a dead zone around the center of the range. Axes not supported by this joystick will always have a value of 0. On Linux, POV hats are represented as axes, usually the last two active axis. </p>

<p>Definition at line <a class="el" href="_i_event_receiver_8h_source.html#l00369">369</a> of file <a class="el" href="_i_event_receiver_8h_source.html">IEventReceiver.h</a>.</p>

</div>
</div>
<a class="anchor" id="a4fd74c22d62c1613405dc3191ccc5b7c"></a><!-- doxytag: member="irr::SEvent::SJoystickEvent::ButtonStates" ref="a4fd74c22d62c1613405dc3191ccc5b7c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> <a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#a4fd74c22d62c1613405dc3191ccc5b7c">irr::SEvent::SJoystickEvent::ButtonStates</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>A bitmap of button states. You can use <a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#adac7656dc2bc1fedab52d7f84ce52872" title="A helper function to check if a button is pressed.">IsButtonPressed()</a> to ( check the state of each button from 0 to (NUMBER_OF_BUTTONS - 1) </p>

<p>Definition at line <a class="el" href="_i_event_receiver_8h_source.html#l00359">359</a> of file <a class="el" href="_i_event_receiver_8h_source.html">IEventReceiver.h</a>.</p>

<p>Referenced by <a class="el" href="_i_event_receiver_8h_source.html#l00384">IsButtonPressed()</a>.</p>

</div>
</div>
<a class="anchor" id="a04424b44a1c3370263afb3af501cae44"></a><!-- doxytag: member="irr::SEvent::SJoystickEvent::Joystick" ref="a04424b44a1c3370263afb3af501cae44" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#a646874f69af8ff87fc10201b0254a761">u8</a> <a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#a04424b44a1c3370263afb3af501cae44">irr::SEvent::SJoystickEvent::Joystick</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The ID of the joystick which generated this event. </p>
<p>This is an internal Irrlicht index; it does not map directly to any particular hardware joystick. </p>

<p>Definition at line <a class="el" href="_i_event_receiver_8h_source.html#l00381">381</a> of file <a class="el" href="_i_event_receiver_8h_source.html">IEventReceiver.h</a>.</p>

</div>
</div>
<a class="anchor" id="af30285332d154507b9752ffde3f6bf84"></a><!-- doxytag: member="irr::SEvent::SJoystickEvent::POV" ref="af30285332d154507b9752ffde3f6bf84" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#ae9f8ec82692ad3b83c21f555bfa70bcc">u16</a> <a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html#af30285332d154507b9752ffde3f6bf84">irr::SEvent::SJoystickEvent::POV</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The POV represents the angle of the POV hat in degrees * 100, from 0 to 35,900. A value of 65535 indicates that the POV hat is centered (or not present). This value is only supported on Windows. On Linux, the POV hat will be sent as 2 axes instead. </p>

<p>Definition at line <a class="el" href="_i_event_receiver_8h_source.html#l00376">376</a> of file <a class="el" href="_i_event_receiver_8h_source.html">IEventReceiver.h</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="_i_event_receiver_8h_source.html">IEventReceiver.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceirr.html">irr</a>      </li>
      <li class="navelem"><a class="el" href="structirr_1_1_s_event.html">SEvent</a>      </li>
      <li class="navelem"><a class="el" href="structirr_1_1_s_event_1_1_s_joystick_event.html">SJoystickEvent</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">
<a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht 
Engine</a> Documentation &copy; 2003-2012 by Nikolaus Gebhardt. Generated on Tue Jan 19 2016 16:08:49 for Irrlicht 3D Engine by
<a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
